require("../css/banner.less")
document.ready(function () {
    // 获取dom(跳过按钮的倒计时)缓存变量
    const skiptime = document.querySelector("#skiptime");
    // 计时器功能
    const IntervalBox = setInterval(function () {
        const toSetCount = skiptime.textContent - 1; //设置内容
        if (toSetCount === 1) {
            //清除计时器并跳转
            clearInterval(IntervalBox)
            // 跳转到登录页
            location.href = "./login.html"
            return;
        }
        skiptime.textContent = toSetCount; //重新赋值
    }, 1000)
    // 跳转功能
    const skip = document.querySelector("#skip")
    skip.addEventListener("click", function () {
        //清除计时器并跳转
        clearInterval(IntervalBox)
        // 跳转到登录页
        location.href = "./login.html"
    })
})